package cn.peifu.hrm.feign;

import cn.peifu.hrm.fallback.LoginFallBackFactory;
import cn.peifu.hrm.to.LoginMealTo;
import cn.peifu.hrm.to.Loginto;
import cn.peifu.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "auth-server",fallbackFactory = LoginFallBackFactory.class)
public interface LoginFeignClient {
    @RequestMapping(value="/login/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Loginto loginto);

    @RequestMapping(value="/meal/saveloginmeal",method= RequestMethod.POST)
    AjaxResult saveLoginMeal(@RequestBody LoginMealTo to);
}
